home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 May: Tool Chest / Dev.CD May 98 TC.toast / Tool Chest / Development Kits / HyperCard Related / APDA HyperCard Toolkits / HyperCard CTB Toolkit 1.0b2 / Source Code / CTBVersion.p < prev    next >
Encoding:
Text File  |  1995-02-07  |  1.3 KB  |  58 lines  |  [TEXT/MPS ]

  1. (*
  2.     CTBVersion() -- Return the current version as a list consisting of the
  3.         Toolkit version, the date of that version, and the Comm Toolbox version.
  4.  
  5.     To compile and link this file using Macintosh Programmer's Workshop,
  6.  
  7.         pascal -w CTBVersion.p
  8.         link -m ENTRYPOINT -o HyperCommands -rt XFCN=2750 -sn Main=CTBVersion ∂
  9.             CTBVersion.p.o "{MPW}"Libraries:Libraries:HyperXLib.o
  10.  
  11.     © Copyright 1990 by Apple Computer, Inc.
  12.  
  13.     Initial coding 2/90 by Harry R. Chesley.
  14. *)
  15.  
  16. {$R-}
  17.  
  18. {$S CTBVersion }     { Segment name must be the same as the command name. }
  19.  
  20. unit DummyUnit;
  21.  
  22. interface
  23.  
  24. uses MemTypes, QuickDraw, OSIntf, ToolIntf, CTBUtils, FTIntf, CMIntf, TMIntf, CRMIntf, HyperXCmd;
  25.  
  26. procedure EntryPoint(paramPtr: XCmdPtr);
  27.     
  28. implementation
  29.  
  30. procedure CTBVersion(paramPtr: XCmdPtr); forward;
  31.  
  32. procedure EntryPoint(paramPtr: XCmdPtr);
  33.  
  34.     begin
  35.         CTBVersion(paramPtr);
  36.     end;
  37.  
  38. procedure CTBVersion(paramPtr: XCmdPtr);
  39.  
  40.     {$I CTBUtil.inc}
  41.  
  42.     var s: Str255;
  43.  
  44.     procedure Fail(errMsg: Str255); { set theResult and quit }
  45.         begin
  46.             paramPtr^.returnValue := PasToZero(paramPtr,errMsg);
  47.             exit(CTBVersion);
  48.         end;
  49.  
  50.     begin
  51.         { Determine if the Comm Toolbox is installed in this system. }
  52.         if CTBInstalled then LongToStr(paramPtr,CTBGetCTBVersion,s)
  53.         else s := 'not installed';
  54.         paramPtr^.returnValue := PasToZero(paramPtr,Concat('1.0b2,10/23/90,CTB ',s))
  55.     end;
  56.  
  57. end.
  58.